@import '../common/common/base';

.header {
  position: fixed;
  top: 0;
  z-index: 9999;
  display: flex;
  width: 100%;
  height: 50px;
  background-color: #fff;
  box-shadow: @box-shadow;

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    width: 960px;

    .logo {
      display: flex;
      align-items: center;

      .avatar {
        display: block;
        padding: 5px;
        height: 50px;
      }

      .site-title {
        h1 {
          margin-right: 25px;
          color: @title-color;
          font-weight: 100;
          font-size: 24px;
        }
      }
    }

    .menu-btn {
      display: none;
    }

    .menu-container {
      display: block;

      ul {
        display: flex;

        li {
          &+li {
            margin-left: 50px;
          }

          a {
            color: @title-color;
            font-weight: 400;

            &:hover {
              color: fade(@title-color, 70%);
            }
          }
        }
      }
    }
  }
}

@media (max-width:960px) {
  .header {
    .nav {
      position: relative;
      padding: 0 20px;
      width: 100%;

      .logo {
        display: none;
      }

      .menu-btn {
        display: block;
        cursor: pointer;
      }

      .menu-container {
        position: absolute;
        top: 50px;
        left: 0;
        display: none;
        width: 100%;
        border-top: 1px solid #aaa;

        ul {
          flex-direction: column;

          li {
            border-bottom: 1px solid #ddd;
            background-color: #fff;
            text-align: center;

            &+li {
              margin-left: 0;
            }

            a {
              display: block;
              padding: 10px 0;

            }
          }
        }
      }
    }
  }
}